<!DOCTYPE HTML>
<html xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
	<link rel="stylesheet" href="../css/currency/bootstrap.css" />
	<link href="../css/H-ui.min.css" rel="stylesheet" type="text/css" />
	<link href="../css/H-ui.admin.css" rel="stylesheet" type="text/css" />
	<link href="../css/style.css" rel="stylesheet" type="text/css" />
	<link href="../lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
	<link rel="stylesheet" href="../css/recipe.css" />	
	<title>终端维修管理</title>
	</head>

	<body>
	<nav class="breadcrumb" style="margin-bottom:0px"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 基础功能 <span class="c-gray en">&gt;</span>终端维修管理列表
		<a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
	</nav>
    <div class="pd-20" id="equipmentRepair">
        <div class="text-c" id="equipmentRepairList">
            <form search-form>
                <!-- TODO 根据业务需要修改搜索内容-->
                <input type="text" class="input-text" style="width:300px" placeholder="位置编号/设备编号" v-model="condition.key" >
				<input id="hiddenText" type="text" style="display:none" class="input-text">
                <div id="selectBtnEnter" class="btn btn-primary" v-on:click="getList('search')">查询</div>
				<div id="exportMaintenanceRecord" class="btn btn-primary" v-on:click="exportMaintenanceRecord()">导出维修记录数据</div>
            </form>
	        <div class="cl pd-5 bg-1 bk-gray mt-20">
	            <span class="l">
	                <a class="btn btn-primary radius addFormula" id="addButton" v-on:click="addOrUpdatePanel('add')">添加</a>
	            </span>
	            <span class="r" v-cloak>
	            	共有数据：{{pageInfo.total}}条
	            </span>
	        </div>
	        <form >
	            <table class="table table-border table-bordered table-bg">
	                <thead>
	                <tr class="text-c">
	                <!--TODO 生成表头-->
						<th nowrap="nowrap" >位置编号</th>
						<th nowrap="nowrap" >设备编号</th>
						<th nowrap="nowrap" >维修人</th>
						<th nowrap="nowrap" >维修人电话</th>
						<th nowrap="nowrap" >门店联系人</th>
						<th nowrap="nowrap" >门店电话</th>
						<th nowrap="nowrap" >维修日期</th>
						<th nowrap="nowrap" >原因</th>
						<th nowrap="nowrap" >创建人</th>
						<th nowrap="nowrap" >创建时间</th>
						<th nowrap="nowrap" >更新人</th>
						<th nowrap="nowrap" >更新时间</th>
						<th nowrap="nowrap">操作</th>
	                </tr>
	                </thead>
	                <tbody v-cloak >
	                    <tr class="text-c" v-for="(item,index) in pageInfo.list" v-on:dblclick="updateInit(index)">
							<td nowrap="nowrap">{{item.postionCode}}</td>
							<td nowrap="nowrap">{{item.equipmentCode}}</td>
							<td nowrap="nowrap">{{item.repairman}}</td>
							<td nowrap="nowrap">{{item.repairmanTel}}</td>
							<td nowrap="nowrap">{{item.shopContacts}}</td>
							<td nowrap="nowrap">{{item.shopPhone}}</td>
							<td nowrap="nowrap">{{item.repairDate}}</td>
							<td nowrap="nowrap">{{item.cause}}</td>
							<td nowrap="nowrap">{{item.creator}}</td>
							<td nowrap="nowrap">{{item.createTime}}</td>
							<td nowrap="nowrap">{{item.modifier}}</td>
							<td nowrap="nowrap">{{item.modifyTime}}</td>
	                        <td>	                          
	                          <a class="btn btn-primary radius" @click="updateInit(index)" >修改</a>
	                          <a  @click="deleteER(index)" >
	                          	<span class="btn btn-primary radius" v-if="item.status=='1'" >删除</span>
	                          </a>
	                        </td>
	                    </tr>
	                </tbody>
	            </table>
	        </form>
	        <div class="pageBox" v-cloak id="pageBox" >
	        	<div class="pageInfo">显示 <span id="startRow">{{pageInfo.startRow}}</span> 到 <span id="endRow">{{pageInfo.endRow}}条</span>&nbsp;&nbsp;&nbsp;&nbsp;{{pageInfo.pages}}页&nbsp;&nbsp;&nbsp;&nbsp;共 <span id="total">{{pageInfo.total}}</span> 条
	                <select v-model="selectedPageSize" v-on:change="getList('changePageSize')">
						<option value="5">5</option>
	                    <option value="10">10</option>
	                    <option value="15">15</option>
	                    <option value="20">20</option>
	                    <option value="50">50</option>
	                </select>
	             </div>
	        	<ul class="pagination" id="pagination"></ul>
	        </div>
	        <div class="tips"  id="noData" align="center" style="display: none">
	        	无数据
	        </div>
        </div>
	    	<!--TODO 添加、更新弹窗-->
	        <form class="form form-horizontal" id="addPanel" style="display: none">
	        <table class="table" border='0' width='100%'>
	            <tr>
				    <td width="25%" align="right" nowrap="nowrap">
				    </td>
				    <td width="40%" style="margin-left: 0px">
				    </td>
				    <td width="35%" ></td>
				</tr>
			    <tr>
				    <td  align="right" nowrap="nowrap">
				        <label class="form-label" style="padding:0px">
				            <span class="c-red">*</span>设备编号：
				        </label>
				    </td>
				    <td >
				        <input type="text" class="input-text radius" name="equipmentCode" v-model="equipmentCode" placeholder="请填写设备编号"/>
				    </td>
				    
				    <td  ><span class="Validform_checktip Validform_wrong errorInfo" v-if="equipmentCodeErr!=''">{{equipmentCodeErr}} </span></td>
				</tr>
			    
			    <tr>
				    <td  align="right" nowrap="nowrap">
				        <label class="form-label" style="padding:0px">
				            <span class="c-red">*</span>维修人：
				        </label>
				    </td>
				    <td >
				        <input type="text" class="input-text radius" name="repairman" v-model="repairman" placeholder="请填写维修人"/>
				    </td>
				    
				    <td  ><span class="Validform_checktip Validform_wrong errorInfo" v-if="repairmanErr!=''">{{repairmanErr}} </span></td>
				</tr>
			    
			    <tr>
				    <td  align="right" nowrap="nowrap">
				        <label class="form-label" style="padding:0px">
				            <span class="c-red">*</span>维修人电话：
				        </label>
				    </td>
				    <td >
				        <input type="text" class="input-text radius" name="repairmanTel" v-model="repairmanTel" placeholder="请填写维修人电话"/>
				    </td>
				    
				    <td  ><span class="Validform_checktip Validform_wrong errorInfo" v-if="repairmanTelErr!=''">{{repairmanTelErr}} </span></td>
				</tr>

				<tr>
					<td  align="right" nowrap="nowrap">
						<label class="form-label" style="padding:0px">
							门店联系人：
						</label>
					</td>
					<td >
						<input type="text" class="input-text radius" name="shopContacts" v-model="shopContacts" placeholder="请填写门店联系人"/>
					</td>

					<td  ><span class="Validform_checktip Validform_wrong errorInfo" v-if="shopContactsErr!=''">{{shopContactsErr}} </span></td>
				</tr>

				<tr>
					<td  align="right" nowrap="nowrap">
						<label class="form-label" style="padding:0px">
							门店联系电话：
						</label>
					</td>
					<td >
						<input type="text" class="input-text radius" name="shopPhone" v-model="shopPhone" placeholder="请填写门店联系电话"/>
					</td>

					<td  ><span class="Validform_checktip Validform_wrong errorInfo" v-if="shopPhoneErr!=''">{{shopPhoneErr}} </span></td>
				</tr>
			    
			    <tr>
				    <td  align="right" nowrap="nowrap">
				        <label class="form-label" style="padding:0px">
				            <span class="c-red">*</span>维修日期：
				        </label>
				    </td>
				    <td >
				        <input type="text" readonly="readonly" v-model="repairDate" id="repairDate-d" @focus="changeTime('repairDate-d')" onfocus="WdatePicker({skin:'default',dateFmt:'yyyy-MM-dd HH:mm:ss',readerOnly:false})" class="input-text Wdate"  placeholder="请输入维修日期">
				    </td>
				    
				    <td  ><span class="Validform_checktip Validform_wrong errorInfo" v-if="repairDateErr!=''">{{repairDateErr}} </span></td>
				</tr>
			    
			    <tr>
				    <td  align="right" nowrap="nowrap">
				        <label class="form-label" style="padding:0px">
				            <span class="c-red">*</span>原因：
				        </label>
				    </td>
				    <td >
						<textarea class="textarea" name="cause" v-model="cause" placeholder="请填写原因" rows="5" >

						</textarea>
				    </td>
				    
				    <td  ><span class="Validform_checktip Validform_wrong errorInfo" v-if="causeErr!=''">{{causeErr}} </span></td>
				</tr>

				<tr>
					<td class="text-r" ></td>
				    <td class="text-c" >
				    	<a class="btn btn-primary radius" id="addCancel" v-on:click="reset">取消</a>
				        <a class="btn btn-primary radius"  id="saveDictType" v-on:click="save">保存</a>
				    </td>
				    <td></td>
				</tr>
	        </table>
	        </form>    
    </div>
	</body>

</html>
<script type="text/javascript" src="../js/common/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="../lib/layer/1.9.3/layer.js" ></script>
<script type="text/javascript" src="../lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript" src="../lib/icheck/jquery.icheck.min.js"></script>
<script type="text/javascript" src="../lib/Validform/5.3.2/Validform.min.js"></script>
<script type="text/javascript" src="../lib/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="../js/common/H-ui.js"></script>
<script type="text/javascript" src="../js/common/H-ui.admin.js"></script>
<script type="text/javascript" src="../js/utils/utils.js"></script>
<script type="text/javascript" src="../js/currency/vue.js"></script>
<script type="text/javascript" src="../js/currency/vue-resource.min.js"></script>
<script type="text/javascript" src="../js/currency/base.js"></script>
<script type="text/javascript" src="../js/currency/jqPaginator.js"></script>
<script type="text/javascript" src="../js/equipmentRepair.js"></script>
